const Controller = require('../core/base_controller');


class AppController extends Controller {
    async powerList() {
        const powers = [
            {
                code: 'SH', label: '售后模块',
                children: [
                    { code: 'SH00', label: '查看', },
                    { code: 'SH01', label: '指派', },
                    { code: 'SH02', label: '接单&转发' },
                    { code: 'SH03', label: '处理&签到' },
                    { code: 'SH04', label: '评价' },
                    { code: 'SH05', label: '查看评价' },
                    { code: 'SH06', label: '归档' },
                ]
            },
        ];
        this.success(powers)
    }

    //获取角色权限
    async getPower() {
        let { id } = this.param
        let data = await this.service.role.getPower(id)
        this.success(data)
    }

    //保存角色权限
    async savePower() {
        let data = await this.service.role.savePower(this.param)
        this.success()
    }
}
module.exports = AppController;
